import authRequest from "../supports/requests/authRequest";

export function getBoxCategories() {
  return authRequest('boxes/categories')
}

export function getBoxs(data) {
  return authRequest('boxes',{ method: 'get', data: data })
}

export function getBoxDetail(id) {
  return authRequest('boxes/'+ id)
}

export function getBoxLevels(id) {
  return authRequest('boxes/'+ id +'/levels')
}

export function getBoxTakeOrders(id,data) {
  return authRequest('boxes/'+ id +'/take/orders',{method: 'get', data: data })
}

export function getBoxProducts(id) {
  return authRequest('boxes/'+ id +'/products')
}

export function createBoxOrder(data) {
  return authRequest('boxes', { method: 'post', data: data })
}  

export function getBoxOrder(id) { 
  return authRequest('boxes/orders/'+ id)
}

export function refreshBoxOrder(data) { 
  return authRequest('boxes/orders/refresh',{ method: 'post', data: data })
}

export function takeBoxOrder(data) { 
  return authRequest('boxes/orders/take',{ method: 'post', data: data })
}
/* export function getCartsCount() {
  return authRequest('carts/count')
}

export function deleteCart(id) {
  return authRequest('carts/' + id, { method: 'delete' })
}

export function updateCart(data) {
  return authRequest('carts/' + data.id, { method: 'put', data: data })
} */
